[mirrors]
http://rtorrent.net/downloads/libtorrent-0.13.6.tar.gz

[vars]
filesize=781253
sha512=b8aea4060357a8a40d15d42f1f698ef6f3ebdc885000bfbfa5bf9c81af8c88b5503a107e05c214e3e8489126928d336356c5e7e0eaf836b6b84a3cf74633b050

[deps.host]
dynamic-toolchain

[deps]
libsigc++
libstdc++
curl
zlib

[build]
[ -n "$CROSS_COMPILE" ] && \
  xconfflags="--host=$($CC -dumpmachine) \
  --with-sysroot=$butch_root_dir"

align=yes
[ "$A" = x86_64 ] && align=no
case "$A" in i[3-6]86) align=no ;; esac

sed -i 's@-Wl,-syslibroot,@-Wl,-syslibroot=@' configure
# remove execinfo.h test which breaks xcompile
sed -i '18271,18305d' configure >/dev/null
CPPFLAGS="-D_GNU_SOURCE" CFLAGS="$optcflags" CXXFLAGS="$optcflags" \
LDFLAGS="$optldflags -Wl,-rpath-link=$butch_root_dir$butch_prefix/lib" \
./configure -C --prefix="$butch_prefix" $xconfflags \
  --enable-aligned=$align --without-kqueue \
  --with-zlib="$butch_root_dir$butch_prefix" \
  --disable-instrumentation
make -j$MAKE_THREADS
make DESTDIR="$butch_install_dir" install
